package top.linyuxb.lycloud.samples.server3.impl;

import com.alibaba.fastjson2.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import top.linyuxb.lycloud.rpc.starter.annotation.LyRpcVersion;
import top.linyuxb.lycloud.samples.config.service.IClientService;

/**
 * Created by Intellij IDEA.
 *
 * @Author: linyuxb
 * @Date: 2024/6/5 11:28
 * @Desc:
 */
@Slf4j
@Service(value = "clientService001")
@LyRpcVersion(version = "001")
public class ClientServiceImpl implements IClientService {
    @Override
    public JSONObject test(String info, JSONObject json) {
        log.info("server3 clientService001 test,info:{},number:{}", info, json);
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("class", "clientService001");
        jsonObject.put("method", "test");
        jsonObject.put("info", info);
        jsonObject.put("number", json);
        return jsonObject;
    }

    @Override
    public String getInfo(String info, Integer number, Boolean type) {
        log.info("server3 clientService001 getInfo,info:{},number:{},type:{}", info, number, type);
        return "server3 clientService001 getInfo" + info + "," + number + "," + type;
    }
}
